﻿namespace HRM.CORE.REPORT
{
    using APP.HELPER.Utils.Security;
    using DevExpress.Utils;
    using DevExpress.XtraPrinting;
    using DevExpress.XtraReports.UI;
    using Dictionary.ERP;
    using HRM.CORE;
    using HRM.CORE.CLASS;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Drawing.Printing;

    public class rptShiftOrder : XtraReport
    {
        private BottomMarginBand BottomMargin;
        private XRTableCell colD28;
        private XRTableCell colD29;
        private XRTableCell colD30;
        private XRTableCell colD31;
        private IContainer components;
        private DetailBand Detail;
        private DetailBand Detail1;
        private DetailReportBand DetailReport;
        private GroupHeaderBand GroupHeader1;
        private HRM_EMPLOYEE l_Employee;
        private DIC_SHIFT l_Shift;
        private HRM_TIMEKEEPER_SHIFT l_TimeKeeperShift;
        private HRM_TIMEKEEPER_TABLELIST l_TimeKeeperTableList;
        private string m_Code;
        private bool m_IsPrintNotNull;
        private int m_Level;
        private int m_Month;
        private int m_Order;
        private int m_Year;
        private XRPictureBox ptPhoto;
        private ReportFooterBand ReportFooter;
        private ReportHeaderBand ReportHeader;
        private TopMarginBand TopMargin;
        private XRLabel txtAddress;
        private XRLabel txtCompany;
        private XRTableCell txtD1;
        private XRTableCell txtD10;
        private XRTableCell txtD11;
        private XRTableCell txtD12;
        private XRTableCell txtD13;
        private XRTableCell txtD14;
        private XRTableCell txtD15;
        private XRTableCell txtD16;
        private XRTableCell txtD17;
        private XRTableCell txtD18;
        private XRTableCell txtD19;
        private XRTableCell txtD2;
        private XRTableCell txtD20;
        private XRTableCell txtD21;
        private XRTableCell txtD22;
        private XRTableCell txtD23;
        private XRTableCell txtD24;
        private XRTableCell txtD25;
        private XRTableCell txtD26;
        private XRTableCell txtD27;
        private XRTableCell txtD28;
        private XRTableCell txtD29;
        private XRTableCell txtD3;
        private XRTableCell txtD30;
        private XRTableCell txtD31;
        private XRTableCell txtD4;
        private XRTableCell txtD5;
        private XRTableCell txtD6;
        private XRTableCell txtD7;
        private XRTableCell txtD8;
        private XRTableCell txtD9;
        private XRLabel txtInformation;
        private XRTableCell txtShiftName;
        private XRLabel txtTimeHour;
        private XRLabel txtTitle;
        private XRLabel txtUnit;
        private XRLabel xrLabel1;
        private XRLabel xrLabel2;
        private XRTable xrTable1;
        private XRTable xrTable2;
        private XRTableCell xrTableCell11;
        private XRTableCell xrTableCell15;
        private XRTableCell xrTableCell16;
        private XRTableCell xrTableCell18;
        private XRTableCell xrTableCell19;
        private XRTableCell xrTableCell20;
        private XRTableCell xrTableCell21;
        private XRTableCell xrTableCell22;
        private XRTableCell xrTableCell23;
        private XRTableCell xrTableCell24;
        private XRTableCell xrTableCell25;
        private XRTableCell xrTableCell26;
        private XRTableCell xrTableCell28;
        private XRTableCell xrTableCell3;
        private XRTableCell xrTableCell30;
        private XRTableCell xrTableCell32;
        private XRTableCell xrTableCell34;
        private XRTableCell xrTableCell38;
        private XRTableCell xrTableCell4;
        private XRTableCell xrTableCell40;
        private XRTableCell xrTableCell42;
        private XRTableCell xrTableCell45;
        private XRTableCell xrTableCell47;
        private XRTableCell xrTableCell49;
        private XRTableCell xrTableCell5;
        private XRTableCell xrTableCell51;
        private XRTableCell xrTableCell6;
        private XRTableCell xrTableCell8;
        private XRTableRow xrTableRow1;
        private XRTableRow xrTableRow2;

        public rptShiftOrder()
        {
            this.components = null;
            this.l_TimeKeeperShift = new HRM_TIMEKEEPER_SHIFT();
            this.l_Shift = new DIC_SHIFT();
            this.l_TimeKeeperTableList = new HRM_TIMEKEEPER_TABLELIST();
            this.l_Employee = new HRM_EMPLOYEE();
            this.m_Level = 0;
            this.m_Code = "";
            this.m_Month = 0;
            this.m_Year = 0;
            this.m_IsPrintNotNull = false;
            this.m_Order = 0;
            this.InitializeComponent();
        }

        public rptShiftOrder(int Level, string Code, int Month, int Year)
        {
            this.components = null;
            this.l_TimeKeeperShift = new HRM_TIMEKEEPER_SHIFT();
            this.l_Shift = new DIC_SHIFT();
            this.l_TimeKeeperTableList = new HRM_TIMEKEEPER_TABLELIST();
            this.l_Employee = new HRM_EMPLOYEE();
            this.m_Level = 0;
            this.m_Code = "";
            this.m_Month = 0;
            this.m_Year = 0;
            this.m_IsPrintNotNull = false;
            this.m_Order = 0;
            this.InitializeComponent();
            this.m_Level = Level;
            this.m_Code = Code;
            this.m_Month = Month;
            this.m_Year = Year;
        }

        public rptShiftOrder(int Level, string Code, int Month, int Year, bool IsPrintNotNull)
        {
            this.components = null;
            this.l_TimeKeeperShift = new HRM_TIMEKEEPER_SHIFT();
            this.l_Shift = new DIC_SHIFT();
            this.l_TimeKeeperTableList = new HRM_TIMEKEEPER_TABLELIST();
            this.l_Employee = new HRM_EMPLOYEE();
            this.m_Level = 0;
            this.m_Code = "";
            this.m_Month = 0;
            this.m_Year = 0;
            this.m_IsPrintNotNull = false;
            this.m_Order = 0;
            this.InitializeComponent();
            this.m_Level = Level;
            this.m_Code = Code;
            this.m_Month = Month;
            this.m_Year = Year;
            this.m_IsPrintNotNull = IsPrintNotNull;
        }

        private string DayName(int Year, int Month, int Day)
        {
            try
            {
                DateTime time = new DateTime(Year, Month, Day);
                return (Day.ToString() + " " + time.DayOfWeek.ToString().Substring(0, 3));
            }
            catch
            {
                return Day.ToString();
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.Detail = new DetailBand();
            this.txtInformation = new XRLabel();
            this.xrTable2 = new XRTable();
            this.xrTableRow2 = new XRTableRow();
            this.txtShiftName = new XRTableCell();
            this.txtD1 = new XRTableCell();
            this.txtD2 = new XRTableCell();
            this.txtD3 = new XRTableCell();
            this.txtD4 = new XRTableCell();
            this.txtD5 = new XRTableCell();
            this.txtD6 = new XRTableCell();
            this.txtD7 = new XRTableCell();
            this.txtD8 = new XRTableCell();
            this.txtD9 = new XRTableCell();
            this.txtD10 = new XRTableCell();
            this.txtD11 = new XRTableCell();
            this.txtD12 = new XRTableCell();
            this.txtD13 = new XRTableCell();
            this.txtD14 = new XRTableCell();
            this.txtD15 = new XRTableCell();
            this.txtD16 = new XRTableCell();
            this.txtD17 = new XRTableCell();
            this.txtD18 = new XRTableCell();
            this.txtD19 = new XRTableCell();
            this.txtD20 = new XRTableCell();
            this.txtD21 = new XRTableCell();
            this.txtD22 = new XRTableCell();
            this.txtD23 = new XRTableCell();
            this.txtD24 = new XRTableCell();
            this.txtD25 = new XRTableCell();
            this.txtD26 = new XRTableCell();
            this.txtD27 = new XRTableCell();
            this.txtD28 = new XRTableCell();
            this.txtD29 = new XRTableCell();
            this.txtD30 = new XRTableCell();
            this.txtD31 = new XRTableCell();
            this.TopMargin = new TopMarginBand();
            this.BottomMargin = new BottomMarginBand();
            this.ReportHeader = new ReportHeaderBand();
            this.txtTimeHour = new XRLabel();
            this.xrLabel1 = new XRLabel();
            this.txtTitle = new XRLabel();
            this.txtUnit = new XRLabel();
            this.txtAddress = new XRLabel();
            this.ptPhoto = new XRPictureBox();
            this.txtCompany = new XRLabel();
            this.xrLabel2 = new XRLabel();
            this.GroupHeader1 = new GroupHeaderBand();
            this.xrTable1 = new XRTable();
            this.xrTableRow1 = new XRTableRow();
            this.xrTableCell11 = new XRTableCell();
            this.xrTableCell3 = new XRTableCell();
            this.xrTableCell4 = new XRTableCell();
            this.xrTableCell6 = new XRTableCell();
            this.xrTableCell18 = new XRTableCell();
            this.xrTableCell15 = new XRTableCell();
            this.xrTableCell5 = new XRTableCell();
            this.xrTableCell16 = new XRTableCell();
            this.xrTableCell23 = new XRTableCell();
            this.xrTableCell21 = new XRTableCell();
            this.xrTableCell24 = new XRTableCell();
            this.xrTableCell25 = new XRTableCell();
            this.xrTableCell20 = new XRTableCell();
            this.xrTableCell19 = new XRTableCell();
            this.xrTableCell22 = new XRTableCell();
            this.xrTableCell38 = new XRTableCell();
            this.xrTableCell30 = new XRTableCell();
            this.xrTableCell40 = new XRTableCell();
            this.xrTableCell26 = new XRTableCell();
            this.xrTableCell42 = new XRTableCell();
            this.xrTableCell32 = new XRTableCell();
            this.xrTableCell45 = new XRTableCell();
            this.xrTableCell8 = new XRTableCell();
            this.xrTableCell47 = new XRTableCell();
            this.xrTableCell34 = new XRTableCell();
            this.xrTableCell49 = new XRTableCell();
            this.xrTableCell28 = new XRTableCell();
            this.xrTableCell51 = new XRTableCell();
            this.colD28 = new XRTableCell();
            this.colD29 = new XRTableCell();
            this.colD30 = new XRTableCell();
            this.colD31 = new XRTableCell();
            this.ReportFooter = new ReportFooterBand();
            this.DetailReport = new DetailReportBand();
            this.Detail1 = new DetailBand();
            this.xrTable2.BeginInit();
            this.xrTable1.BeginInit();
            this.BeginInit();
            this.Detail.Controls.AddRange(new XRControl[] { this.txtInformation });
            this.Detail.HeightF = 20.83333f;
            this.Detail.Name = "Detail";
            this.Detail.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.Detail.TextAlignment = TextAlignment.TopLeft;
            this.txtInformation.BackColor = Color.WhiteSmoke;
            this.txtInformation.Borders = BorderSide.Bottom | BorderSide.Right | BorderSide.Left;
            this.txtInformation.Font = new Font("Times New Roman", 8.75f);
            this.txtInformation.LocationFloat = new PointFloat(0f, 0f);
            this.txtInformation.Name = "txtInformation";
            this.txtInformation.Padding = new PaddingInfo(4, 2, 0, 0, 100f);
            this.txtInformation.SizeF = new SizeF(1132f, 20.83333f);
            this.txtInformation.StylePriority.UseBackColor = false;
            this.txtInformation.StylePriority.UseBorders = false;
            this.txtInformation.StylePriority.UseFont = false;
            this.txtInformation.StylePriority.UsePadding = false;
            this.txtInformation.StylePriority.UseTextAlignment = false;
            this.txtInformation.Text = "txtInformation";
            this.txtInformation.TextAlignment = TextAlignment.MiddleLeft;
            this.txtInformation.BeforePrint += new PrintEventHandler(this.txtInformation_BeforePrint);
            this.xrTable2.Borders = BorderSide.Bottom | BorderSide.Right | BorderSide.Left;
            this.xrTable2.Font = new Font("Times New Roman", 8.25f);
            this.xrTable2.LocationFloat = new PointFloat(0f, 0f);
            this.xrTable2.Name = "xrTable2";
            this.xrTable2.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.xrTable2.Rows.AddRange(new XRTableRow[] { this.xrTableRow2 });
            this.xrTable2.SizeF = new SizeF(1132f, 29.16667f);
            this.xrTable2.StylePriority.UseBorders = false;
            this.xrTable2.StylePriority.UseFont = false;
            this.xrTable2.StylePriority.UsePadding = false;
            this.xrTable2.StylePriority.UseTextAlignment = false;
            this.xrTable2.TextAlignment = TextAlignment.MiddleLeft;
            this.xrTableRow2.Cells.AddRange(new XRTableCell[] { 
                this.txtShiftName, this.txtD1, this.txtD2, this.txtD3, this.txtD4, this.txtD5, this.txtD6, this.txtD7, this.txtD8, this.txtD9, this.txtD10, this.txtD11, this.txtD12, this.txtD13, this.txtD14, this.txtD15, 
                this.txtD16, this.txtD17, this.txtD18, this.txtD19, this.txtD20, this.txtD21, this.txtD22, this.txtD23, this.txtD24, this.txtD25, this.txtD26, this.txtD27, this.txtD28, this.txtD29, this.txtD30, this.txtD31
             });
            this.xrTableRow2.Name = "xrTableRow2";
            this.xrTableRow2.Weight = 1.0;
            this.txtShiftName.Font = new Font("Times New Roman", 8.25f);
            this.txtShiftName.Name = "txtShiftName";
            this.txtShiftName.StylePriority.UseFont = false;
            this.txtShiftName.Text = "txtShiftName";
            this.txtShiftName.Weight = 0.37324447084732315;
            this.txtD1.Name = "txtD1";
            this.txtD1.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD1.StylePriority.UsePadding = false;
            this.txtD1.StylePriority.UseTextAlignment = false;
            this.txtD1.Text = "txtD1";
            this.txtD1.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD1.Weight = 0.16806905287634877;
            this.txtD1.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD2.Name = "txtD2";
            this.txtD2.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD2.StylePriority.UsePadding = false;
            this.txtD2.StylePriority.UseTextAlignment = false;
            this.txtD2.Text = "txtD2";
            this.txtD2.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD2.Weight = 0.1680689793856911;
            this.txtD2.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD3.Name = "txtD3";
            this.txtD3.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD3.StylePriority.UsePadding = false;
            this.txtD3.StylePriority.UseTextAlignment = false;
            this.txtD3.Text = "txtD3";
            this.txtD3.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD3.Weight = 0.1680688986779354;
            this.txtD3.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD4.Name = "txtD4";
            this.txtD4.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD4.StylePriority.UsePadding = false;
            this.txtD4.StylePriority.UseTextAlignment = false;
            this.txtD4.Text = "txtD4";
            this.txtD4.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD4.Weight = 0.1680689864971282;
            this.txtD4.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD5.Name = "txtD5";
            this.txtD5.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD5.StylePriority.UsePadding = false;
            this.txtD5.StylePriority.UseTextAlignment = false;
            this.txtD5.Text = "txtD5";
            this.txtD5.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD5.Weight = 0.16806905471045475;
            this.txtD5.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD6.Name = "txtD6";
            this.txtD6.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD6.StylePriority.UsePadding = false;
            this.txtD6.StylePriority.UseTextAlignment = false;
            this.txtD6.Text = "txtD6";
            this.txtD6.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD6.Weight = 0.16806904980355397;
            this.txtD6.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD7.Name = "txtD7";
            this.txtD7.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD7.StylePriority.UsePadding = false;
            this.txtD7.StylePriority.UseTextAlignment = false;
            this.txtD7.Text = "txtD7";
            this.txtD7.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD7.Weight = 0.1680688208238067;
            this.txtD7.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD8.Name = "txtD8";
            this.txtD8.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD8.StylePriority.UsePadding = false;
            this.txtD8.StylePriority.UseTextAlignment = false;
            this.txtD8.Text = "txtD8";
            this.txtD8.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD8.Weight = 0.168069132101354;
            this.txtD8.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD9.Name = "txtD9";
            this.txtD9.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD9.StylePriority.UsePadding = false;
            this.txtD9.StylePriority.UseTextAlignment = false;
            this.txtD9.Text = "txtD9";
            this.txtD9.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD9.Weight = 0.16806898124673458;
            this.txtD9.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD10.Name = "txtD10";
            this.txtD10.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD10.StylePriority.UsePadding = false;
            this.txtD10.StylePriority.UseTextAlignment = false;
            this.txtD10.Text = "txtD10";
            this.txtD10.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD10.Weight = 0.16806898334390108;
            this.txtD10.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD11.Name = "txtD11";
            this.txtD11.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD11.StylePriority.UsePadding = false;
            this.txtD11.StylePriority.UseTextAlignment = false;
            this.txtD11.Text = "txtD11";
            this.txtD11.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD11.Weight = 0.16806897443836616;
            this.txtD11.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD12.Name = "txtD12";
            this.txtD12.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD12.StylePriority.UsePadding = false;
            this.txtD12.StylePriority.UseTextAlignment = false;
            this.txtD12.Text = "txtD12";
            this.txtD12.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD12.Weight = 0.168068974438366;
            this.txtD12.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD13.Name = "txtD13";
            this.txtD13.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD13.StylePriority.UsePadding = false;
            this.txtD13.StylePriority.UseTextAlignment = false;
            this.txtD13.Text = "txtD13";
            this.txtD13.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD13.Weight = 0.16806897691858491;
            this.txtD13.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD14.Name = "txtD14";
            this.txtD14.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD14.StylePriority.UsePadding = false;
            this.txtD14.StylePriority.UseTextAlignment = false;
            this.txtD14.Text = "txtD14";
            this.txtD14.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD14.Weight = 0.16806867624447458;
            this.txtD14.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD15.Name = "txtD15";
            this.txtD15.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD15.StylePriority.UsePadding = false;
            this.txtD15.StylePriority.UseTextAlignment = false;
            this.txtD15.Text = "txtD15";
            this.txtD15.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD15.Weight = 0.1680695738356045;
            this.txtD15.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD16.Name = "txtD16";
            this.txtD16.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD16.StylePriority.UsePadding = false;
            this.txtD16.StylePriority.UseTextAlignment = false;
            this.txtD16.Text = "txtD16";
            this.txtD16.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD16.Weight = 0.16806836699838984;
            this.txtD16.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD17.Name = "txtD17";
            this.txtD17.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD17.StylePriority.UsePadding = false;
            this.txtD17.StylePriority.UseTextAlignment = false;
            this.txtD17.Text = "txtD17";
            this.txtD17.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD17.Weight = 0.16806927212630096;
            this.txtD17.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD18.Name = "txtD18";
            this.txtD18.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD18.StylePriority.UsePadding = false;
            this.txtD18.StylePriority.UseTextAlignment = false;
            this.txtD18.Text = "txtD18";
            this.txtD18.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD18.Weight = 0.1680689704169972;
            this.txtD18.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD19.Name = "txtD19";
            this.txtD19.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD19.StylePriority.UsePadding = false;
            this.txtD19.StylePriority.UseTextAlignment = false;
            this.txtD19.Text = "txtD19";
            this.txtD19.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD19.Weight = 0.16806898927382885;
            this.txtD19.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD20.Name = "txtD20";
            this.txtD20.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD20.StylePriority.UsePadding = false;
            this.txtD20.StylePriority.UseTextAlignment = false;
            this.txtD20.Text = "txtD20";
            this.txtD20.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD20.Weight = 0.16806898927382874;
            this.txtD20.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD21.Name = "txtD21";
            this.txtD21.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD21.StylePriority.UsePadding = false;
            this.txtD21.StylePriority.UseTextAlignment = false;
            this.txtD21.Text = "txtD21";
            this.txtD21.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD21.Weight = 0.16806868756452498;
            this.txtD21.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD22.Name = "txtD22";
            this.txtD22.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD22.StylePriority.UsePadding = false;
            this.txtD22.StylePriority.UseTextAlignment = false;
            this.txtD22.Text = "txtD22";
            this.txtD22.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD22.Weight = 0.16806897041699709;
            this.txtD22.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD23.Name = "txtD23";
            this.txtD23.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD23.StylePriority.UsePadding = false;
            this.txtD23.StylePriority.UseTextAlignment = false;
            this.txtD23.Text = "txtD23";
            this.txtD23.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD23.Weight = 0.16806928155471679;
            this.txtD23.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD24.Name = "txtD24";
            this.txtD24.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD24.StylePriority.UsePadding = false;
            this.txtD24.StylePriority.UseTextAlignment = false;
            this.txtD24.Text = "txtD24";
            this.txtD24.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD24.Weight = 0.16806897984541291;
            this.txtD24.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD25.Name = "txtD25";
            this.txtD25.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD25.StylePriority.UsePadding = false;
            this.txtD25.StylePriority.UseTextAlignment = false;
            this.txtD25.Text = "txtD25";
            this.txtD25.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD25.Weight = 0.16806897984541302;
            this.txtD25.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD26.Name = "txtD26";
            this.txtD26.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD26.StylePriority.UsePadding = false;
            this.txtD26.StylePriority.UseTextAlignment = false;
            this.txtD26.Text = "txtD26";
            this.txtD26.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD26.Weight = 0.16806897984541314;
            this.txtD26.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD27.Name = "txtD27";
            this.txtD27.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD27.StylePriority.UsePadding = false;
            this.txtD27.StylePriority.UseTextAlignment = false;
            this.txtD27.Text = "txtD27";
            this.txtD27.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD27.Weight = 0.16806867813610937;
            this.txtD27.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD28.Name = "txtD28";
            this.txtD28.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD28.StylePriority.UsePadding = false;
            this.txtD28.StylePriority.UseTextAlignment = false;
            this.txtD28.Text = "txtD28";
            this.txtD28.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD28.Weight = 0.16806988497332398;
            this.txtD28.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD29.Name = "txtD29";
            this.txtD29.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD29.StylePriority.UsePadding = false;
            this.txtD29.StylePriority.UseTextAlignment = false;
            this.txtD29.Text = "txtD29";
            this.txtD29.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD29.Weight = 0.16806777389495653;
            this.txtD29.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD30.Name = "txtD30";
            this.txtD30.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD30.StylePriority.UsePadding = false;
            this.txtD30.StylePriority.UseTextAlignment = false;
            this.txtD30.Text = "txtD30";
            this.txtD30.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD30.Weight = 0.168069584150779;
            this.txtD30.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.txtD31.Name = "txtD31";
            this.txtD31.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.txtD31.StylePriority.UsePadding = false;
            this.txtD31.StylePriority.UseTextAlignment = false;
            this.txtD31.Text = "txtD31";
            this.txtD31.TextAlignment = TextAlignment.MiddleCenter;
            this.txtD31.Weight = 0.18039434801591625;
            this.txtD31.BeforePrint += new PrintEventHandler(this.txtD_BeforePrint);
            this.TopMargin.HeightF = 40f;
            this.TopMargin.Name = "TopMargin";
            this.TopMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.TopMargin.TextAlignment = TextAlignment.TopLeft;
            this.BottomMargin.HeightF = 40f;
            this.BottomMargin.Name = "BottomMargin";
            this.BottomMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.BottomMargin.TextAlignment = TextAlignment.TopLeft;
            this.ReportHeader.Controls.AddRange(new XRControl[] { this.txtTimeHour, this.xrLabel1, this.txtTitle, this.txtUnit, this.txtAddress, this.ptPhoto, this.txtCompany, this.xrLabel2 });
            this.ReportHeader.HeightF = 143.7083f;
            this.ReportHeader.Name = "ReportHeader";
            this.txtTimeHour.LocationFloat = new PointFloat(109.5066f, 120.7083f);
            this.txtTimeHour.Name = "txtTimeHour";
            this.txtTimeHour.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtTimeHour.SizeF = new SizeF(1022.493f, 22.99999f);
            this.txtTimeHour.StylePriority.UseTextAlignment = false;
            this.txtTimeHour.TextAlignment = TextAlignment.MiddleLeft;
            this.xrLabel1.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrLabel1.LocationFloat = new PointFloat(0f, 120.7083f);
            this.xrLabel1.Name = "xrLabel1";
            this.xrLabel1.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel1.SizeF = new SizeF(108f, 22.99999f);
            this.xrLabel1.StylePriority.UseFont = false;
            this.xrLabel1.StylePriority.UseTextAlignment = false;
            this.xrLabel1.Text = "GIỜ QUY ĐỊNH:";
            this.xrLabel1.TextAlignment = TextAlignment.MiddleLeft;
            this.txtTitle.Font = new Font("Times New Roman", 14f, FontStyle.Bold);
            this.txtTitle.LocationFloat = new PointFloat(3.178914E-05f, 68.75f);
            this.txtTitle.Name = "txtTitle";
            this.txtTitle.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtTitle.SizeF = new SizeF(1132f, 30.25001f);
            this.txtTitle.StylePriority.UseFont = false;
            this.txtTitle.StylePriority.UseTextAlignment = false;
            this.txtTitle.Text = "BẢNG XẾP CA TH\x00c1NG 00/0000";
            this.txtTitle.TextAlignment = TextAlignment.MiddleCenter;
            this.txtUnit.LocationFloat = new PointFloat(0f, 99.00001f);
            this.txtUnit.Name = "txtUnit";
            this.txtUnit.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtUnit.SizeF = new SizeF(1132f, 17.70834f);
            this.txtUnit.StylePriority.UseTextAlignment = false;
            this.txtUnit.TextAlignment = TextAlignment.MiddleCenter;
            this.txtAddress.LocationFloat = new PointFloat(154.3333f, 31.70837f);
            this.txtAddress.Name = "txtAddress";
            this.txtAddress.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtAddress.SizeF = new SizeF(413.3749f, 17.70833f);
            this.txtAddress.StylePriority.UseTextAlignment = false;
            this.txtAddress.Text = "txtAddress";
            this.txtAddress.TextAlignment = TextAlignment.MiddleLeft;
            this.ptPhoto.LocationFloat = new PointFloat(9.000008f, 3.999996f);
            this.ptPhoto.Name = "ptPhoto";
            this.ptPhoto.SizeF = new SizeF(94.50658f, 58.54166f);
            this.ptPhoto.Sizing = ImageSizeMode.ZoomImage;
            this.txtCompany.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.txtCompany.LocationFloat = new PointFloat(105.5417f, 10.00001f);
            this.txtCompany.Name = "txtCompany";
            this.txtCompany.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtCompany.SizeF = new SizeF(458.1665f, 17.70833f);
            this.txtCompany.StylePriority.UseFont = false;
            this.txtCompany.StylePriority.UseTextAlignment = false;
            this.txtCompany.Text = "txtCompany";
            this.txtCompany.TextAlignment = TextAlignment.MiddleLeft;
            this.xrLabel2.LocationFloat = new PointFloat(105.5417f, 31.70827f);
            this.xrLabel2.Name = "xrLabel2";
            this.xrLabel2.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel2.SizeF = new SizeF(48.7916f, 17.70833f);
            this.xrLabel2.StylePriority.UseTextAlignment = false;
            this.xrLabel2.Text = "Địa chỉ:";
            this.xrLabel2.TextAlignment = TextAlignment.MiddleLeft;
            this.GroupHeader1.Controls.AddRange(new XRControl[] { this.xrTable1 });
            this.GroupHeader1.HeightF = 34.16665f;
            this.GroupHeader1.Name = "GroupHeader1";
            this.GroupHeader1.RepeatEveryPage = true;
            this.xrTable1.AnchorVertical = VerticalAnchorStyles.Bottom;
            this.xrTable1.BackColor = Color.WhiteSmoke;
            this.xrTable1.Borders = BorderSide.All;
            this.xrTable1.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.xrTable1.LocationFloat = new PointFloat(4.768372E-05f, 0f);
            this.xrTable1.Name = "xrTable1";
            this.xrTable1.Rows.AddRange(new XRTableRow[] { this.xrTableRow1 });
            this.xrTable1.SizeF = new SizeF(1132f, 34.16665f);
            this.xrTable1.StylePriority.UseBackColor = false;
            this.xrTable1.StylePriority.UseBorders = false;
            this.xrTable1.StylePriority.UseFont = false;
            this.xrTable1.StylePriority.UseTextAlignment = false;
            this.xrTable1.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableRow1.Cells.AddRange(new XRTableCell[] { 
                this.xrTableCell11, this.xrTableCell3, this.xrTableCell4, this.xrTableCell6, this.xrTableCell18, this.xrTableCell15, this.xrTableCell5, this.xrTableCell16, this.xrTableCell23, this.xrTableCell21, this.xrTableCell24, this.xrTableCell25, this.xrTableCell20, this.xrTableCell19, this.xrTableCell22, this.xrTableCell38, 
                this.xrTableCell30, this.xrTableCell40, this.xrTableCell26, this.xrTableCell42, this.xrTableCell32, this.xrTableCell45, this.xrTableCell8, this.xrTableCell47, this.xrTableCell34, this.xrTableCell49, this.xrTableCell28, this.xrTableCell51, this.colD28, this.colD29, this.colD30, this.colD31
             });
            this.xrTableRow1.Name = "xrTableRow1";
            this.xrTableRow1.Weight = 1.0;
            this.xrTableCell11.CanGrow = false;
            this.xrTableCell11.Name = "xrTableCell11";
            this.xrTableCell11.Text = "Ca";
            this.xrTableCell11.Weight = 0.37324437226742313;
            this.xrTableCell3.CanGrow = false;
            this.xrTableCell3.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.xrTableCell3.Name = "xrTableCell3";
            this.xrTableCell3.StylePriority.UseFont = false;
            this.xrTableCell3.StylePriority.UseTextAlignment = false;
            this.xrTableCell3.Text = "1";
            this.xrTableCell3.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell3.Weight = 0.16806900214093987;
            this.xrTableCell4.CanGrow = false;
            this.xrTableCell4.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.xrTableCell4.Name = "xrTableCell4";
            this.xrTableCell4.StylePriority.UseFont = false;
            this.xrTableCell4.StylePriority.UseTextAlignment = false;
            this.xrTableCell4.Text = "2";
            this.xrTableCell4.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell4.Weight = 0.16806900290773161;
            this.xrTableCell6.CanGrow = false;
            this.xrTableCell6.Name = "xrTableCell6";
            this.xrTableCell6.Text = "3";
            this.xrTableCell6.Weight = 0.16806901362419185;
            this.xrTableCell18.CanGrow = false;
            this.xrTableCell18.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.xrTableCell18.Name = "xrTableCell18";
            this.xrTableCell18.StylePriority.UseFont = false;
            this.xrTableCell18.StylePriority.UseTextAlignment = false;
            this.xrTableCell18.Text = "4";
            this.xrTableCell18.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell18.Weight = 0.16806900837399125;
            this.xrTableCell15.CanGrow = false;
            this.xrTableCell15.Name = "xrTableCell15";
            this.xrTableCell15.Text = "5";
            this.xrTableCell15.Weight = 0.16806901027597157;
            this.xrTableCell5.CanGrow = false;
            this.xrTableCell5.Name = "xrTableCell5";
            this.xrTableCell5.Text = "6";
            this.xrTableCell5.Weight = 0.16806900662131591;
            this.xrTableCell16.CanGrow = false;
            this.xrTableCell16.Name = "xrTableCell16";
            this.xrTableCell16.Text = "7";
            this.xrTableCell16.Weight = 0.16806901133551677;
            this.xrTableCell23.CanGrow = false;
            this.xrTableCell23.Name = "xrTableCell23";
            this.xrTableCell23.Text = "8";
            this.xrTableCell23.Weight = 0.16806900739654221;
            this.xrTableCell21.CanGrow = false;
            this.xrTableCell21.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.xrTableCell21.Name = "xrTableCell21";
            this.xrTableCell21.StylePriority.UseFont = false;
            this.xrTableCell21.StylePriority.UseTextAlignment = false;
            this.xrTableCell21.Text = "9";
            this.xrTableCell21.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell21.Weight = 0.1680690073965424;
            this.xrTableCell24.CanGrow = false;
            this.xrTableCell24.Name = "xrTableCell24";
            this.xrTableCell24.Text = "10";
            this.xrTableCell24.Weight = 0.16806901122140994;
            this.xrTableCell25.CanGrow = false;
            this.xrTableCell25.Name = "xrTableCell25";
            this.xrTableCell25.Text = "11";
            this.xrTableCell25.Weight = 0.16806901246983846;
            this.xrTableCell20.CanGrow = false;
            this.xrTableCell20.Name = "xrTableCell20";
            this.xrTableCell20.Text = "12";
            this.xrTableCell20.Weight = 0.16806901189815135;
            this.xrTableCell19.CanGrow = false;
            this.xrTableCell19.Name = "xrTableCell19";
            this.xrTableCell19.Text = "13";
            this.xrTableCell19.Weight = 0.16806901148200887;
            this.xrTableCell22.CanGrow = false;
            this.xrTableCell22.Name = "xrTableCell22";
            this.xrTableCell22.Text = "14";
            this.xrTableCell22.Weight = 0.16806900853060186;
            this.xrTableCell38.CanGrow = false;
            this.xrTableCell38.Name = "xrTableCell38";
            this.xrTableCell38.Text = "15";
            this.xrTableCell38.Weight = 0.16806901014045589;
            this.xrTableCell30.CanGrow = false;
            this.xrTableCell30.Name = "xrTableCell30";
            this.xrTableCell30.Text = "16";
            this.xrTableCell30.Weight = 0.16806901014045619;
            this.xrTableCell40.CanGrow = false;
            this.xrTableCell40.Name = "xrTableCell40";
            this.xrTableCell40.Text = "17";
            this.xrTableCell40.Weight = 0.16806901014045622;
            this.xrTableCell26.CanGrow = false;
            this.xrTableCell26.Name = "xrTableCell26";
            this.xrTableCell26.Text = "18";
            this.xrTableCell26.Weight = 0.16806901014045614;
            this.xrTableCell42.CanGrow = false;
            this.xrTableCell42.Name = "xrTableCell42";
            this.xrTableCell42.Text = "19";
            this.xrTableCell42.Weight = 0.16806901014045508;
            this.xrTableCell32.CanGrow = false;
            this.xrTableCell32.Name = "xrTableCell32";
            this.xrTableCell32.Text = "20";
            this.xrTableCell32.Weight = 0.16806901014045508;
            this.xrTableCell45.CanGrow = false;
            this.xrTableCell45.Name = "xrTableCell45";
            this.xrTableCell45.Text = "21";
            this.xrTableCell45.Weight = 0.16806901014045506;
            this.xrTableCell8.CanGrow = false;
            this.xrTableCell8.Name = "xrTableCell8";
            this.xrTableCell8.Text = "22";
            this.xrTableCell8.Weight = 0.16806901014045506;
            this.xrTableCell47.CanGrow = false;
            this.xrTableCell47.Name = "xrTableCell47";
            this.xrTableCell47.Text = "23";
            this.xrTableCell47.Weight = 0.16806900755455056;
            this.xrTableCell34.CanGrow = false;
            this.xrTableCell34.Name = "xrTableCell34";
            this.xrTableCell34.Text = "24";
            this.xrTableCell34.Weight = 0.16806900801215258;
            this.xrTableCell49.CanGrow = false;
            this.xrTableCell49.Name = "xrTableCell49";
            this.xrTableCell49.Text = "25";
            this.xrTableCell49.Weight = 0.16806901485466458;
            this.xrTableCell28.CanGrow = false;
            this.xrTableCell28.Name = "xrTableCell28";
            this.xrTableCell28.Text = "26";
            this.xrTableCell28.Weight = 0.16806901485466452;
            this.xrTableCell51.CanGrow = false;
            this.xrTableCell51.Name = "xrTableCell51";
            this.xrTableCell51.Text = "27";
            this.xrTableCell51.Weight = 0.16806901485466458;
            this.colD28.CanGrow = false;
            this.colD28.Name = "colD28";
            this.colD28.Text = "28";
            this.colD28.Weight = 0.16806901071214239;
            this.colD29.CanGrow = false;
            this.colD29.Name = "colD29";
            this.colD29.Text = "29";
            this.colD29.Weight = 0.16806900395089394;
            this.colD30.CanGrow = false;
            this.colD30.Name = "colD30";
            this.colD30.Text = "30";
            this.colD30.Weight = 0.16806900566595295;
            this.colD31.CanGrow = false;
            this.colD31.Name = "colD31";
            this.colD31.Text = "31";
            this.colD31.Weight = 0.18039469825784085;
            this.ReportFooter.HeightF = 6f;
            this.ReportFooter.Name = "ReportFooter";
            this.DetailReport.Bands.AddRange(new Band[] { this.Detail1 });
            this.DetailReport.Font = new Font("Times New Roman", 9.75f);
            this.DetailReport.Level = 0;
            this.DetailReport.Name = "DetailReport";
            this.Detail1.Controls.AddRange(new XRControl[] { this.xrTable2 });
            this.Detail1.HeightF = 29.16667f;
            this.Detail1.Name = "Detail1";
            base.Bands.AddRange(new Band[] { this.Detail, this.TopMargin, this.BottomMargin, this.ReportHeader, this.GroupHeader1, this.ReportFooter, this.DetailReport });
            base.Font = new Font("Times New Roman", 9.75f);
            base.Landscape = true;
            base.Margins = new Margins(0x12, 0x13, 40, 40);
            base.PageHeight = 0x33b;
            base.PageWidth = 0x491;
            base.PaperKind = PaperKind.A4;
            this.TextAlignment = TextAlignment.TopCenter;
            base.Version = "9.3";
            this.BeforePrint += new PrintEventHandler(this.rptListEmployee_BeforePrint);
            this.xrTable2.EndInit();
            this.xrTable1.EndInit();
            this.EndInit();
        }

        private void InitInterface()
        {
            int numberDay = DateTime.DaysInMonth(this.m_Year, this.m_Month);
            this.ShowHideColumn(numberDay);
            for (int i = 1; i <= numberDay; i++)
            {
                DateTime date = new DateTime(this.m_Year, this.m_Month, i);
                clsTimeKeeperOption option = new clsTimeKeeperOption();
                if (date.DayOfWeek.ToString() == "Monday")
                {
                    this.xrTableRow2.Cells[i].BackColor = option.MondayColor;
                }
                else if (date.DayOfWeek.ToString() == "Tuesday")
                {
                    this.xrTableRow2.Cells[i].BackColor = option.TuesdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Wednesday")
                {
                    this.xrTableRow2.Cells[i].BackColor = option.WednesdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Thursday")
                {
                    this.xrTableRow2.Cells[i].BackColor = option.ThursdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Friday")
                {
                    this.xrTableRow2.Cells[i].BackColor = option.FridayColor;
                }
                else if (date.DayOfWeek.ToString() == "Saturday")
                {
                    this.xrTableRow2.Cells[i].BackColor = option.SaturdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Sunday")
                {
                    this.xrTableRow2.Cells[i].BackColor = option.SundayColor;
                }
                DIC_HOLIDAY dic_holiday = new DIC_HOLIDAY();
                if (dic_holiday.Exist(date))
                {
                    this.xrTableRow2.Cells[i].BackColor = option.HolidayColor;
                }
                this.xrTableRow1.Cells[i].Text = this.DayName(this.m_Year, this.m_Month, i);
            }
        }

        private void LoadAllData()
        {
            this.InitInterface();
            this.l_TimeKeeperTableList.Get(this.m_Month, this.m_Year);
            DateTime dayFirstMonth = new DateTime(this.m_Year, this.m_Month, 1);
            DateTime dayEndMonth = new DateTime(this.m_Year, this.m_Month, DateTime.DaysInMonth(this.m_Year, this.m_Month));
            DataSet set = new DataSet();
            DataTable table = new DataTable();
            table = this.l_Employee.GetList(this.m_Level, this.m_Code, 1, dayFirstMonth, dayEndMonth);
            if (this.m_Level != 0)
            {
                if (this.m_Level == 1)
                {
                    HRM_BRANCH hrm_branch = new HRM_BRANCH();
                    hrm_branch.Get(this.m_Code);
                    this.txtUnit.Text = "Đơn vị: " + hrm_branch.BranchName;
                }
                else if (this.m_Level == 2)
                {
                    HRM_DEPARTMENT hrm_department = new HRM_DEPARTMENT();
                    hrm_department.Get(this.m_Code);
                    this.txtUnit.Text = "Đơn vị: " + hrm_department.DepartmentName;
                }
                else if (this.m_Level == 3)
                {
                    HRM_GROUP hrm_group = new HRM_GROUP();
                    hrm_group.Get(this.m_Code);
                    this.txtUnit.Text = "Đơn vị: " + hrm_group.GroupName;
                }
            }
            set.Tables.Add(table);
            base.DataSource = set;
            this.txtInformation.DataBindings.Add("Text", base.DataSource, "EmployeeCode");
        }

        private void rptListEmployee_BeforePrint(object sender, PrintEventArgs e)
        {
            this.txtTitle.Text = "BẢNG XẾP CA TH\x00c1NG " + this.m_Month.ToString() + "/" + this.m_Year.ToString();
            foreach (DataRow row in this.l_Shift.GetList().Rows)
            {
                this.txtTimeHour.Text = this.txtTimeHour.Text + row["ShiftName"].ToString() + " (" + row["ShiftCode"].ToString() + ": " + DateTime.Parse(row["BeginTime"].ToString()).ToString("HH:mm tt") + "-" + DateTime.Parse(row["EndTime"].ToString()).ToString("HH:mm tt") + "); ";
            }
            this.LoadAllData();
            ////if (MyInfo.Get(MyEncryption.Encrypt("ERP01", "123654", true)) == "OK")
            {
                this.txtCompany.Text = "";// MyInfo.Company.ToUpper();
                this.txtAddress.Text = "";//MyInfo.Address;
                this.ptPhoto.Image = null;//MyInfo.Photo;
            }
            CreateFooterReport.CreateFooter("IsTimekeeper", this.ReportFooter, this);
        }

        private void ShowHideColumn(int NumberDay)
        {
            switch (NumberDay)
            {
                case 0x1c:
                    this.xrTableRow1.Cells.Remove(this.colD31);
                    this.xrTableRow2.Cells.Remove(this.txtD31);
                    this.xrTableRow1.Cells.Remove(this.colD30);
                    this.xrTableRow2.Cells.Remove(this.txtD30);
                    this.xrTableRow1.Cells.Remove(this.colD29);
                    this.xrTableRow2.Cells.Remove(this.txtD29);
                    break;

                case 0x1d:
                    this.xrTableRow1.Cells.Remove(this.colD31);
                    this.xrTableRow2.Cells.Remove(this.txtD31);
                    this.xrTableRow1.Cells.Remove(this.colD30);
                    this.xrTableRow2.Cells.Remove(this.txtD30);
                    break;

                case 30:
                    this.xrTableRow1.Cells.Remove(this.colD31);
                    this.xrTableRow2.Cells.Remove(this.txtD31);
                    break;
            }
        }

        private void txtD_BeforePrint(object sender, PrintEventArgs e)
        {
            XRTableCell cell = sender as XRTableCell;
            if (cell.Text == "True")
            {
                cell.Text = "X";
            }
            else
            {
                cell.Text = "";
            }
        }

        private void txtInformation_BeforePrint(object sender, PrintEventArgs e)
        {
            int num;
            string text = this.txtInformation.Text;
            DataSet set = new DataSet();
            DataTable table = new DataTable();
            table = this.l_TimeKeeperShift.GetListByEmployee(this.l_TimeKeeperTableList.TimeKeeperTableListID, text, this.m_IsPrintNotNull);
            set.Tables.Add(table);
            this.DetailReport.DataSource = set;
            this.l_Employee.Get(text);
            string[] strArray = new string[10];
            this.m_Order = num = this.m_Order + 1;
            strArray[0] = num.ToString();
            strArray[1] = ". ";
            strArray[2] = this.l_Employee.EmployeeCode;
            strArray[3] = " - ";
            strArray[4] = this.l_Employee.FirstName;
            strArray[5] = " ";
            strArray[6] = this.l_Employee.LastName;
            strArray[7] = " (Tổng giờ quy định: ";
            strArray[8] = HRM_TIMEKEEPER_SHIFT.TotalHour(this.l_TimeKeeperTableList.TimeKeeperTableListID, text).ToString();
            strArray[9] = " giờ)";
            this.txtInformation.Text = string.Concat(strArray);
            this.txtShiftName.DataBindings.Add("Text", this.DetailReport.DataSource, "ShiftName");
            this.txtD1.DataBindings.Add("Text", this.DetailReport.DataSource, "D1");
            this.txtD2.DataBindings.Add("Text", this.DetailReport.DataSource, "D2");
            this.txtD3.DataBindings.Add("Text", this.DetailReport.DataSource, "D3");
            this.txtD4.DataBindings.Add("Text", this.DetailReport.DataSource, "D4");
            this.txtD5.DataBindings.Add("Text", this.DetailReport.DataSource, "D5");
            this.txtD6.DataBindings.Add("Text", this.DetailReport.DataSource, "D6");
            this.txtD7.DataBindings.Add("Text", this.DetailReport.DataSource, "D7");
            this.txtD8.DataBindings.Add("Text", this.DetailReport.DataSource, "D8");
            this.txtD9.DataBindings.Add("Text", this.DetailReport.DataSource, "D9");
            this.txtD10.DataBindings.Add("Text", this.DetailReport.DataSource, "D10");
            this.txtD11.DataBindings.Add("Text", this.DetailReport.DataSource, "D11");
            this.txtD12.DataBindings.Add("Text", this.DetailReport.DataSource, "D12");
            this.txtD13.DataBindings.Add("Text", this.DetailReport.DataSource, "D13");
            this.txtD14.DataBindings.Add("Text", this.DetailReport.DataSource, "D14");
            this.txtD15.DataBindings.Add("Text", this.DetailReport.DataSource, "D15");
            this.txtD16.DataBindings.Add("Text", this.DetailReport.DataSource, "D16");
            this.txtD17.DataBindings.Add("Text", this.DetailReport.DataSource, "D17");
            this.txtD18.DataBindings.Add("Text", this.DetailReport.DataSource, "D18");
            this.txtD19.DataBindings.Add("Text", this.DetailReport.DataSource, "D19");
            this.txtD20.DataBindings.Add("Text", this.DetailReport.DataSource, "D20");
            this.txtD21.DataBindings.Add("Text", this.DetailReport.DataSource, "D21");
            this.txtD22.DataBindings.Add("Text", this.DetailReport.DataSource, "D22");
            this.txtD23.DataBindings.Add("Text", this.DetailReport.DataSource, "D23");
            this.txtD24.DataBindings.Add("Text", this.DetailReport.DataSource, "D24");
            this.txtD25.DataBindings.Add("Text", this.DetailReport.DataSource, "D25");
            this.txtD26.DataBindings.Add("Text", this.DetailReport.DataSource, "D26");
            this.txtD27.DataBindings.Add("Text", this.DetailReport.DataSource, "D27");
            this.txtD28.DataBindings.Add("Text", this.DetailReport.DataSource, "D28");
            this.txtD29.DataBindings.Add("Text", this.DetailReport.DataSource, "D29");
            this.txtD30.DataBindings.Add("Text", this.DetailReport.DataSource, "D30");
            this.txtD31.DataBindings.Add("Text", this.DetailReport.DataSource, "D31");
        }
    }
}

